#include <string>
#include <iostream>
#include <iomanip>
#include <ostream>
#include "time.h"
using namespace std;

//
// Class Appointment
// represents an appointment with a subject, 
// start time, end time	
//

class Appointment{
public:	
	Appointment();
	Appointment(time start, time end, string subject) throw(int);
	~Appointment();
	Appointment(const Appointment& app);
	Appointment& operator=(const Appointment& app);
	bool operator==(const Appointment& app) const;
	// public getters
	time getStartTime() const;
	time getEndTime() const;
	time getDuration() const;
	string getSubject() const;
private:
	time start;
	time end;
	time duration;
	string subject;
};

// overloaded << operator for Appointment class
// not declared as friend because Appointment provides public getters  
ostream& operator<<(ostream& os, const Appointment& app);